%ul.nav.nav-sidebar
  = nav_link(controller: :dashboard, html_options: {class: 'home'}) do
    = link_to admin_root_path, title: '概览' do
      = icon('dashboard fw')
      %span
        概览
  = nav_link(controller: [:admin, :projects]) do
    = link_to admin_namespaces_projects_path, title: '项目' do
      = icon('cube fw')
      %span
        项目
  = nav_link(controller: :users) do
    = link_to admin_users_path, title: '用户' do
      = icon('user fw')
      %span
        用户
  = nav_link(controller: :groups) do
    = link_to admin_groups_path, title: '群组' do
      = icon('group fw')
      %span
        群组
  = nav_link(controller: :deploy_keys) do
    = link_to admin_deploy_keys_path, title: '部署密钥' do
      = icon('key fw')
      %span
        部署密钥
  = nav_link path: ['runners#index', 'runners#show'] do
    = link_to admin_runners_path, title: 'Runners' do
      = icon('cog fw')
      %span
        Runners
        %span.count= number_with_delimiter(Ci::Runner.count(:all))
  = nav_link path: 'builds#index' do
    = link_to admin_builds_path, title: '构建' do
      = icon('link fw')
      %span
        构建
        %span.count= number_with_delimiter(Ci::Build.count(:all))
  = nav_link(controller: :logs) do
    = link_to admin_logs_path, title: '日志' do
      = icon('file-text fw')
      %span
        日志
  = nav_link(controller: :health_check) do
    = link_to admin_health_check_path, title: '健康检查' do
      = icon('medkit fw')
      %span
        健康检查
  = nav_link(controller: :broadcast_messages) do
    = link_to admin_broadcast_messages_path, title: '信息' do
      = icon('bullhorn fw')
      %span
        信息
  = nav_link(controller: :hooks) do
    = link_to admin_hooks_path, title: '钩子' do
      = icon('external-link fw')
      %span
        钩子
  = nav_link(controller: :background_jobs) do
    = link_to admin_background_jobs_path, title: '后台作业' do
      = icon('cog fw')
      %span
        后台作业
  = nav_link(controller: :appearances) do
    = link_to admin_appearances_path, title: '外观' do
      = icon('image')
      %span
        外观

  = nav_link(controller: :applications) do
    = link_to admin_applications_path, title: '应用' do
      = icon('cloud fw')
      %span
        应用

  = nav_link(controller: :services) do
    = link_to admin_application_settings_services_path, title: '服务模板' do
      = icon('copy fw')
      %span
        服务模板

  = nav_link(controller: :labels) do
    = link_to admin_labels_path, title: '标记' do
      = icon('tags fw')
      %span
        标记

  = nav_link(controller: :abuse_reports) do
    = link_to admin_abuse_reports_path, title: "滥用举报" do
      = icon('exclamation-circle fw')
      %span
        滥用举报
        %span.count= number_with_delimiter(AbuseReport.count(:all))

  - if askimet_enabled?
    = nav_link(controller: :spam_logs) do
      = link_to admin_spam_logs_path, title: "Spam 日志" do
        = icon('exclamation-triangle fw')
        %span
          Spam 日志
          %span.count= number_with_delimiter(SpamLog.count(:all))

  = nav_link(controller: :application_settings, html_options: { class: 'separate-item'}) do
    = link_to admin_application_settings_path, title: '设置' do
      = icon('cogs fw')
      %span
        设置
